home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_qt.idb / usr / freeware / include / Qt / qbuttongroup.h.z / qbuttongroup.h
Encoding:
C/C++ Source or Header  |  1998-10-28  |  1.9 KB  |  76 lines

  1. /****************************************************************************
  2. ** $Id: qbuttongroup.h,v 2.7 1998/07/03 00:09:47 hanord Exp $
  3. **
  4. ** Definition of QButtonGroup class
  5. **
  6. ** Created : 950130
  7. **
  8. ** Copyright (C) 1992-1998 Troll Tech AS.  All rights reserved.
  9. **
  10. ** This file is part of Qt Free Edition, version 1.40.
  11. **
  12. ** See the file LICENSE included in the distribution for the usage
  13. ** and distribution terms, or http://www.troll.no/free-license.html.
  14. **
  15. ** IMPORTANT NOTE: You may NOT copy this file or any part of it into
  16. ** your own programs or libraries.
  17. **
  18. ** Please see http://www.troll.no/pricing.html for information about 
  19. ** Qt Professional Edition, which is this same library but with a
  20. ** license which allows creation of commercial/proprietary software.
  21. **
  22. *****************************************************************************/
  23.  
  24. #ifndef QBUTTONGROUP_H
  25. #define QBUTTONGROUP_H
  26.  
  27. #ifndef QT_H
  28. #include "qgroupbox.h"
  29. #endif // QT_H
  30.  
  31.  
  32. class QButton;
  33. class QButtonList;
  34.  
  35.  
  36. class QButtonGroup : public QGroupBox
  37. {
  38.     Q_OBJECT
  39. public:
  40.     QButtonGroup( QWidget *parent=0, const char *name=0 );
  41.     QButtonGroup( const char *title, QWidget *parent=0, const char *name=0 );
  42.    ~QButtonGroup();
  43.  
  44.     bool    isExclusive() const;
  45.     void    setExclusive( bool );
  46.  
  47.     int        insert( QButton *, int id=-1 );
  48.     void    remove( QButton * );
  49.     QButton    *find( int id ) const;
  50.  
  51.     void    setButton( int id );
  52.  
  53. signals:
  54.     void    pressed( int id );
  55.     void    released( int id );
  56.     void    clicked( int id );
  57.  
  58. protected slots:
  59.     void    buttonPressed();
  60.     void    buttonReleased();
  61.     void    buttonClicked();
  62.     void    buttonToggled( bool on );
  63.  
  64. private:
  65.     void    init();
  66.     bool    excl_grp;
  67.     QButtonList *buttons;
  68.  
  69. private:    // Disabled copy constructor and operator=
  70.     QButtonGroup( const QButtonGroup & );
  71.     QButtonGroup &operator=( const QButtonGroup & );
  72. };
  73.  
  74.  
  75. #endif // QBUTTONGROUP_H
  76.